package com.xdf.zipperdye.service;

import com.xdf.zipperdye.dao.business.SysUserRoleMapper;
import com.xdf.zipperdye.model.SysUserRole;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SysUserRoleServiceImpl implements SysUserRoleService {

    @Autowired
    private SysUserRoleMapper dao;

    @Override
    public int deleteByPrimaryKey(Integer iid) {
        return dao.deleteByPrimaryKey(iid);
    }

    @Override
    public SysUserRole insert(SysUserRole record) {
        int ret = dao.insert(record);
        return record;
    }

    @Override
    public SysUserRole insertSelective(SysUserRole record) {
        int ret = dao.insertSelective(record);
        return record;
    }

    @Override
    public SysUserRole selectByPrimaryKey(Integer iid) {
        return dao.selectByPrimaryKey(iid);
    }

    @Override
    public SysUserRole updateByPrimaryKeySelective(SysUserRole record) {
        int ret = dao.updateByPrimaryKeySelective(record);
        return record;
    }

    @Override
    public SysUserRole updateByPrimaryKey(SysUserRole record) {
        int ret = dao.updateByPrimaryKey(record);
        return record;
    }

    @Override
    public List<SysUserRole> selectAll() {
        return dao.selectAll();
    }

    @Override
    public List<SysUserRole> selectByRoleIid(int role_pk) {
        return dao.selectByRoleIid(role_pk);
    }

    @Override
    public int deleteByUserIid(int user_pk) {
        return dao.deleteByUserIid(user_pk);
    }


}